package com.grieous.web.mvc.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.grieous.solr.SearchDB;

import domain.PageModel;

@Controller
public class HomeController {
	@RequestMapping("s.htm")
	public String search(String search,Integer page,Integer pageSize,HttpServletRequest request){
		if(search !=null && search!=""){
			PageModel pageModel=SearchDB.search(search, page,pageSize);
			request.setAttribute("search", search);
			request.setAttribute("pageModel", pageModel);
		}
		return "search";
	}
	public static void main(String[] args) {
		System.out.println("1");
	}
}
